package com.pd.backend.controller;

import com.pd.backend.pojo.PdTruckType;
import com.pd.backend.service.PdTruckTypeService;
import com.pd.backend.dtos.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * 车辆类型控制层
 */
@RestController
@RequestMapping("/PdTruckType")
@Slf4j
@Api(tags = "车型管理")
public class PdTruckTypeController {
    @Autowired
    private PdTruckTypeService pdTruckTypeService;

    /**
     * 查询全部车辆类型
     * @return
     */
    @ApiOperation(value = "查询全部车型")
    @GetMapping("/selectAllTruckType")
    public ResponseResult<List<PdTruckType>> selectAllTruckType(){
        return pdTruckTypeService.selectAllTruckType();
    }

}